#ifndef SPRITEREF_H
#define SPRITEREF_H

#include "SFML/Graphics.hpp"
#include <qpixmap.h>
#include <qstring.h>

#include "ImageManager.h"

class SpriteRef : public sf::Sprite
{
public:
    SpriteRef();
    SpriteRef(const QString& imagePath, const QPoint& position = QPoint(), const QRect& subRect = QRect());

    const QPixmap& getPixmap() const;
    const QPoint& getPosition() const;
    const QRect& getSubRect() const;

    virtual void setImage(const QString& imagePath);
    void setPosition(const QPoint& position);
    void setSubRect(const QRect& subRect);
    void move(int dx, int dy);

private:
    ImageRef* m_imageRef;
    QPoint m_position;

protected:
    QRect m_subRect;
};

#endif // SPRITEREF_H
